package com.ruicar.afs.cloud.common.modules.dto.mq.loan.contractdto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.AdjustTypeEnum;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.CostTypeEnum;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @param
 * @author yk.Li
 * @description 合同金融协议
 * @date 2020/7/8
 */
@Data
public class ContractFinancialAgreementDTO {
    /**
     * 主键ID
     */
    @JSONField(name = "id")
    private Long id ;
    /**
     * 合同号码
     */
    @JSONField(name = "contractNo")
    private String contractNo;
    /**
     * 车辆ID
     */
    @JSONField(name = "carId")
    private Long carId;
    /**
     * 产品ID
     */
    @JSONField(name = "productId")
    @JsonSerialize(using = ToStringSerializer.class)
    private String productId;

    /**
     * 产品名称
     */
    @JSONField(name = "productName")
    @JsonSerialize(using = ToStringSerializer.class)
    private String productName;

    /**
     * 融资费用类型 车款，附加贷
     */
    @JSONField(name = "costType", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private CostTypeEnum costType;
    /**
     * 合同金额
     */
    @JSONField(name = "contractAmt")
    private BigDecimal contractAmt;
    /**
     * 客户利率/贴息后利率
     */
    @JSONField(name = "custRate")
    private BigDecimal custRate;
    /**
     * 结算利率
     */
    @JSONField(name = "settleRate")
    private BigDecimal settleRate;
    /**
     * 上调/下调 枚举值：上调，下调
     */
    @JSONField(name = "adjustType", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private AdjustTypeEnum adjustType;
    /**
     * 调整基点
     */
    @JSONField(name = "basicPoint")
    private Integer basicPoint;
    /**
     * 首付比例
     */
    @JSONField(name = "downPayScale")
    private BigDecimal downPayScale;
    /**
     * 首付金额
     */
    @JSONField(name = "downPayAmt")
    private BigDecimal downPayAmt;
    /**
     * 尾付比例
     */
    @JSONField(name = "tailPayScale")
    private BigDecimal tailPayScale;
    /**
     * 尾付金额
     */
    @JSONField(name = "tailPayAmt")
    private BigDecimal tailPayAmt;
    /**
     * 贴息总额
     */
    @JSONField(name = "totalDiscountAmt")
    private BigDecimal discountAmt;
    /**
     * 贷款金额
     */
    @JSONField(name = "loanAmt")
    private BigDecimal loanAmt;
    /**
     * 厂商最大贴息额
     */
    @JSONField(name = "maxDiscountAmt")
    private BigDecimal maxDiscountAmt;
    /**
     * 利息总额
     */
    @JSONField(name = "totalInterest")
    private BigDecimal totalInterest;

    /**
     * 租金总额
     */
    @JSONField(name = "totalRent")
    private BigDecimal totalRent;

    /**
     * 融资期数
     */
    @JSONField(name = "loanTerm")
    private Integer loanTerm;
    /**
     * 月供金额
     */
    @JSONField(name = "monthPayAmt")
    private BigDecimal monthPayAmt;
    /**
     * 算法类型
     */
    @JSONField(name = "algorithmType")
    private String algorithmType;
    /**
     * 贴息方式
     */
    @JSONField(name = "discountType")
    private String discountType;

    /**
     * 是否尾款
     */
    @JSONField(name = "isTail")
    private String isTail;

    /**
     * 是否有子产品
     */
    @JSONField(name = "isSubProduct")
    private String isSubProduct;
    /**
     * 附加贷金额
     */
    @JSONField(name = "addAmt")
    private BigDecimal addAmt;
}
